#ifndef ERODE_COND_DETAIL_H_
#define ERODE_COND_DETAIL_H_

#include "../base_filter.h"
#include "boost/multi_array.hpp"

namespace boost {
namespace gil {
namespace extension {
namespace filters {
namespace morph {
namespace detail {

class size_lookup
{
public:
    size_lookup(const base_filter::image_t::const_view_t& view);
    int getSize(int x, int y);

private:
    void calculateSize(int x, int y);

    const base_filter::image_t::const_view_t& view;
    boost::multi_array<int, 2> sizes;
};

}
}
}
}
}
}

#endif /* ERODE_COND_DETAIL_H_ */
